var doGetShow = function(url, params, showid) {
	var myAjax = new Ajax.Updater({
				success : showid
			}, url, {
				method : "post",
				parameters : params,
				evalScripts : true,
				onFailure : function() {
					alert("error");
				}
			});
};
var doPostShow = function(url, formname, showid) {
	var formObj = eval("window.document." + formname);
	var myAjax = new Ajax.Updater({
				success : showid
			}, url, {
				method : "post",
				parameters : Form.serialize(formObj),
				evalScripts : true,
				onFailure : function() {
					// alert("error");
				}
			});
};
var doPostSaveAndNext = function(url, formname, funcName) {
	var formObj = eval("window.document." + formname);
	var myAjax = new Ajax.Request( url, {
				method : "post",
				parameters : Form.serialize(formObj),
				//evalScripts : true,
				onSuccess : funcName
			});
};
var doPostFileShow = function(url, formname, showid) {
	var formObj = eval("window.document." + formname);
	var myAjax = new Ajax.Updater({
				success : showid
			}, url, {
				enctype : "multipart/form-data",
				method : "post",
				parameters : Form.serialize(formObj),
				evalScripts : true,
				onFailure : function() {
					alert("error");
				}
			});
};
// 通过ajax夹在信息的信息提示
var doAjaxPostShow = function(url, formname, showid, waitid) {
	var formObj = eval("window.document." + formname);
	var myAjax = new Ajax.Updater({
				success : showid
			}, url, {
				method : "post",
				parameters : Form.serialize(formObj),
				evalScripts : true,
				onCreate : function() {
					$(waitid).innerHTML = "<font color='red'>正在加载中,请稍候...</font>";
				},
				onComplete : function() {
					$(waitid).innerHTML = "";
				},
				onFailure : function() {
					// alert("error");
				}
			});
};
// 打印通过ajax夹在信息的信息提示
var doAjaxPostPrint = function(url, formname, showid, waitid) {
	var formObj = eval("window.document." + formname);
	var myAjax = new Ajax.Updater({
				success : showid
			}, url, {
				method : "post",
				parameters : Form.serialize(formObj),
				evalScripts : true,
				onCreate : function() {
					$(waitid).innerHTML = "<font color='red'>正在加载中,请稍候...</font>";
					$('print').disabled = true;
				},
				onComplete : function() {
					$(waitid).innerHTML = "";
					$('print').disabled = false;

				},
				onFailure : function() {
					// alert("error");
				}
			});
};
// 加入ajax加载信息的信息提示
var doAjaxGetShow = function(url, params, showid, waitid) {
	var myAjax = new Ajax.Updater({
				success : showid
			}, url, {
				method : "post",
				parameters : params,
				evalScripts : true,
				onCreate : function() {
					$(waitid).innerHTML = "<font color='red'>正在加载中,请稍候...</font>";
				},
				onComplete : function() {
					$(waitid).innerHTML = "";
				},
				onFailure : function() {
					// alert("error");
				}
			});
};
// ajax得到json串
var getJsonAjax = function(url, params, originalRequest, waitInfo) {
	var ajaxCount = new Ajax.Request(url, {
				method : 'post',
				parameters : params,
				onComplete : originalRequest,
				onCreate : waitInfo,
				onFailure : function() {
					// alert("error");
				}
			});
};

/**
 * 异步请求页面，将页面显示在showid指定的位置<br>
 * 并且可定制onCreate和onComplete方法的实现（适用于相应的触发的函数中有较多操作时）
 */
var doAjaxGetShow_onfuc = function(url, params, showid, oncreate, oncomplete) {
	var myAjax = new Ajax.Updater({
				success : showid
			}, url, {
				method : "post",
				parameters : params,
				evalScripts : true,
				onCreate :oncreate,
				onComplete :oncomplete,
				onFailure : function() {
					// alert("error");
				}
			});
};